package bma.common.netty.protobuf.core.impl;

import java.io.InputStream;

import bma.common.netty.protobuf.core.BaseProtos.PHeader;
import bma.common.netty.protobuf.core.BaseProtos.PRequest;
import bma.common.netty.protobuf.core.PRequestContext;

public abstract class PRequestContextAbstract implements PRequestContext {

	protected PHeader header;
	protected PRequest request;
	protected InputStream inputStream;

	public PRequestContextAbstract(PHeader requestHeader, PRequest req,
			InputStream inputStream) {
		super();
		this.header = requestHeader;
		this.request = req;
		this.inputStream = inputStream;
	}

	@Override
	public PHeader getHeader() {
		return header;
	}

	@Override
	public PRequest getRequest() {
		return request;
	}

	@Override
	public InputStream getInputStream() {
		return inputStream;
	}

	@Override
	public String toString() {
		return getHeader() + "/" + getRequest();
	}
}
